package com.hyj.shop.project.index.service.impl;

import com.hyj.shop.project.index.domain.SwipperMenus;
import com.hyj.shop.project.utils.domain.AjaxResult;
import com.hyj.shop.project.utils.domain.Msg;
import com.hyj.shop.project.index.mapper.SwipperMapper;
import com.hyj.shop.project.index.service.SwipperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SwipperServiceImpl implements SwipperService {

    @Autowired
    private SwipperMapper swipperMapper;
    @Override

    public Msg findAll() {
        System.out.println(9527);
      List list=  swipperMapper.findAll();
      Msg msg =new Msg();
      msg.setCode(200);
      msg.setData(list);
      msg.setStatus("success");
        return msg;
    }

    @Override
    public AjaxResult swipperMenusQueryAll() {
       List<SwipperMenus> list= swipperMapper.queryAll();
       AjaxResult ajaxResult=AjaxResult.success("查询成功");
        ajaxResult.put("code",200);
        ajaxResult.put("data",list);
       return ajaxResult;
    }
}
